package com.crl.rcdp.monitor.controller;

import com.cars.util.json.JsonResult;
import com.cars.util.json.JsonResultUtil;
import com.crl.rcdp.sys.service.SysErrorLogService;
import com.crl.rcdp.sys.vo.SysErrorLogSearchVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: 孔垂云
 * @version: 1.0
 * @date: 2020/6/22 11:23
 */
@RestController
@RequestMapping("/monitor/errorlog")
@Api(description = "绑定业务系统管理操作：绑定，解绑，修改绑定密码，查询。", tags = "01.日志管理")
public class MonitorErrorLogController {
    @Autowired
    private SysErrorLogService sysErrorLogService;

    /**
     * 查询日志
     */
    @PostMapping("/list")
    @ApiOperation(value = "查询列表", notes = "查询日志,根据日志名查询,pageIndex从1开始，表示当前第几页", response = JsonResult.class)
    public JsonResult list(@RequestBody SysErrorLogSearchVO sysErrorLogSearchVO) {
        return JsonResultUtil.ok(sysErrorLogService.list(sysErrorLogSearchVO));
    }
}
